package org.humboldt.cassia.ws.esquemas;

import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

public class ForgivingErrorHandler implements ErrorHandler {
	public StringBuilder erro = new StringBuilder();
    public void warning(SAXParseException ex) {
        System.err.println(ex.getMessage());
        erro.append("\n"+ex.getMessage());
    }

    public void error(SAXParseException ex) {
        System.err.println(ex.getMessage());
        erro.append("\n"+ex.getMessage());
    }

    public void fatalError(SAXParseException ex) throws SAXException {
    	erro.append("\n"+ex.getMessage());
        throw ex;
    }

}
